package br.com.j7.jdesk.persistence.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Version;

/**
 * Classe da entidade Contacts
 * 
 * @author Edivando Alves
 *
 */
@Entity
public class Contacts implements Serializable{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer idContact;
	@Column(nullable=true)
	private String cdContact;
	private String cdEmail;
	@Lob
	private String dsContact;
	@Version
	private Integer nrVersion;
	
	public Contacts() {
	}

	public Integer getIdContact() {
		return idContact;
	}

	public void setIdContact(Integer idContact) {
		this.idContact = idContact;
	}

	public String getCdContact() {
		return cdContact;
	}

	public void setCdContact(String cdContact) {
		this.cdContact = cdContact;
	}

	public String getCdEmail() {
		return cdEmail;
	}

	public void setCdEmail(String cdEmail) {
		this.cdEmail = cdEmail;
	}

	public String getDsContact() {
		return dsContact;
	}

	public void setDsContact(String dsContact) {
		this.dsContact = dsContact;
	}
	
	public Integer getNrVersion() {
		return nrVersion;
	}
	
	public void setNrVersion(Integer nrVersion) {
		this.nrVersion = nrVersion;
	}

	@Override
	public int hashCode() {
		return idContact;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Contacts other = (Contacts) obj;
		if (idContact == null) {
			if (other.idContact != null)
				return false;
		} else if (!idContact.equals(other.idContact))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return cdContact;
	}
	
	
	
	
	
	
}
